package com.nowcoder.community.dao;

import com.nowcoder.community.entity.Comment;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
//显示评论
@Mapper
public interface CommentMapper {
    //根据实体来查询，因为评论有多种类型
    List<Comment> selectCommentsByEntity(int entityType, int entityId, int offset, int limit);
    //查询条数
    int selectCountByEntity(int entityType, int entityId);
    //添加评论
    int insertComment(Comment comment);

    Comment selectCommentById(int id);

}
